#ifndef __CAN_DISPATCH_H
#define __CAN_DISPATCH_H

#include "..\..\common\can\cancomm.h"
#include "..\..\common\can\canfrm.h"
#include "..\..\common\can\canpriv.h"
#include "..\..\common\can\canfile.h"
#include "..\common\msg.h"
#include "sjconfig.h"

void CANDispatch_Init(void);
void CANDispatch_Task(void *pData);
INT32U CANDispatch_MessageProcess(void* pMsgVoid);

INT32U CANDispatch_MsgFileSendRequest(STRU_MSG88 *pStru_Msg88);

INT32U CANDispatch_IOBInfoPacketReceive(STRU_MSG88 *pStru_Msg88);

void CANDispatch_IOBReceiveFireInfoPacket(STRU_CAN_INFOPACKET *pStru_InfoPacket);
void CANDispatch_IOBReceiveFaultInfoPacket(STRU_CAN_INFOPACKET *pStru_InfoPacket);

INT32U CANDispatch_HOSTInfoPacketReceive_Sub(STRU_CAN_INFOPACKET *pStru_InfoPacket);

INT32U CANDispatch_HOSTInfoPacketReceive(STRU_MSG88 *pStru_Msg88);

INT32U 	CANDispatch_MsgFileReceiveSuccess(STRU_MSG88 *pStru_Msg88);

INT32U CANDispatch_SM_Action(STRU_MSG88 *pStru_Msg88);

//INT32U CANDispatch_IOBRegisterInfoModify(STRU_MSG88 *pStru_Msg88);

INT32U CANDispatch_NetworkRegisterInfoModify(STRU_MSG88 *pStru_Msg88);

INT32U CANDispatch_FSDRegisterInfoModify(STRU_MSG88 *pStru_Msg88);

INT32U CANDispatch_CANNodeFaultDispatch(STRU_MSG88 *pStru_Msg88);
//INT32U CANDispatch_OTHERHOST_RESEND(STRU_MSG88 *pStru_Msg88);

INT32U	CANDispatch_AutoLogonRequest(STRU_MSG88 *pStru_Msg88);

INT32U CANDispatch_SystemReset(STRU_MSG88 *pStru_Msg88);

//INT32U CANDispatch_IOBResetRequest(STRU_MSG88 *pStru_Msg88);

INT32U CANDispatch_HOSTResetRequest(STRU_MSG88 *pStru_Msg88);

INT32U CANDispatch_SystemMute(STRU_MSG88 *pStru_Msg88);

INT32U CANDispatch_SystemMuteFromOtherHost(STRU_MSG88 *pStru_Msg88);

INT32U CANDispatch_SelfCheck(STRU_MSG88 *pStru_Msg88);

INT32U CANDispatch_SelfCheck_FromOtherHost(STRU_MSG88 *pStru_Msg88);

void CANDispatch_IOBReceiveIOBFileRequest(STRU_CAN_INFOPACKET *pStru_InfoPacket);

//INT32U 	CANDispatch_IOBFileDownloadRequest(STRU_MSG88 *pStru_Msg88);

INT32U CANDispatch_IOBAutoLogonReceiveHandle(STRU_CAN_FILE_GETRECEIVEBUFFER_PARAM *pStru_FileGetReceiveBufferParam);

STRU_IOB_DATA_CONTAINER *CANDispatch_GetIOBAutoLogonBuffer(void);

INT32U	CANDispatch_IOBSingleTest(STRU_MSG88 *pStru_Msg88);
INT32U	CANDispatch_LineDisplay(STRU_MSG88 *pStru_Msg88);


INT32U	CANDispatch_CheckSameCode(STRU_MSG88 *pStru_Msg88);

INT32U	CANDispatch_IOBWorkModeSet(STRU_MSG88 *pStru_Msg88);

void CANDispatch_IOBSingleTestReport(STRU_CAN_INFOPACKET *pStru_InfoPacket);

void CANDispatch_CheckSameCodeReport(STRU_CAN_INFOPACKET *pStru_InfoPacket);

INT32U	CANDispatch_FaultHandle(STRU_MSG88 *pStru_Msg88);

INT32U CANDispatch_Isolation(STRU_MSG88 *pStru_Msg88);

INT32U CANDispatch_GernalCommand(STRU_MSG88 *pStru_Msg88);

INT32U CANDispatch_OtherHostModuleActionRequest(STRU_MSG88 *pStru_Msg88);

INT32U CANDispatch_ReceiveOtherHostModuleActRequest(STRU_CAN_INFOPACKET *pStru_InfoPacket);

void CANDispatch_IOBReceiveRequestInfoPacket(STRU_CAN_INFOPACKET *pStru_InfoPacket);

INT32U AutoLogonReceive(INT8U ucSrcAddr);
#endif
